import { AxiosPromise } from "axios";
import request from "@/utils/request";
import { StudyCourseExperimentVO, SubmitQuery } from "./types";

/**
 * 任务分页列表
 * AxiosPromise<PageResult<StudentPageVO[]>>
 * @param queryParams
 */
export function getSubmitPage(
  queryParams: SubmitQuery
): AxiosPromise<PageResult<StudyCourseExperimentVO[]>> {
  return request({
    url: "/api/v1/system/course/study/experiments",
    method: "get",
    params: queryParams,
  });
}

/**
 * 提交任务报告
 * AxiosPromise<PageResult<StudentPageVO[]>>
 * @param queryParams
 */
export function submitExp(fileIds: string, experimentId: number) {
  return request({
    url: "/api/v1/system/course/study/submitExpReport",
    method: "get",
    params: {
      fileIds,
      experimentId,
    },
  });
}
